Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Series] Implementation #608

Merged
merged 19 commits into from
May 5, 2023
Merged

[Series] Implementation #608

merged 19 commits into from
May 5, 2023

Conversation

habere-et-dispertire
Copy link
Contributor

@github-actions
Copy link

Hello. Thanks for opening a PR on Exercism. We are currently in a phase of our journey where we have paused community contributions to allow us to take a breather and redesign our community model. You can learn more in this blog post. As such, all issues and PRs in this repository are being automatically closed.

That doesn't mean we're not interested in your ideas, or that if you're stuck on something we don't want to help. The best place to discuss things is with our community on the Exercism Community Forum. You can use this link to copy this into a new topic there.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

@github-actions github-actions bot closed this Apr 26, 2023
Updated UUID.
@m-dango m-dango reopened this Apr 26, 2023
cmp-ok( # begin: 7ae7a46a-d992-4c2a-9c15-a112d125ebad
series("1", 1),
"eqv",
$["1"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the decontanerization operator before calling .raku if you want to omit the leading $s

https://docs.raku.org/language/operators#postcircumfix_%3C%3E

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should all the .raku calls be prefixed with decontainerization ?

PS. The files are all over the place — so sorry — I'll fix that. That's the first and last time I try drag and drop on GitHub ! I was just trying to speed things up ! Sigh.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't be necessary for all of them. Usually the ones that could use decontainerization are contents of arrays.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put one in on the expected result %case<expected>.<>.raku, so now the generated tests read:

cmp-ok( # begin: 7ae7a46a-d992-4c2a-9c15-a112d125ebad
    series("1", 1),
    "eqv",
    ["1"],
    "slices of one from one",
); # end: 7ae7a46a-d992-4c2a-9c15-a112d125ebad

@m-dango
Copy link
Member

m-dango commented Apr 28, 2023

The files are currently in the main exercises/practice dir, rather than their own series dir.

@habere-et-dispertire
Copy link
Contributor Author

I moved all the files misplaced by GitHub Drag & Drop. Thank you for your patience.

@habere-et-dispertire habere-et-dispertire marked this pull request as ready for review April 28, 2023 22:03
cmp-ok( # begin: 7ae7a46a-d992-4c2a-9c15-a112d125ebad
series("1", 1),
"eqv",
["1"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd personally prefer a list for the sake of consistency. I tend to choose lists over arrays if I have no intention of assigning/modifying the contents: https://github.com/exercism/raku/blob/main/exercises/practice/all-your-base/all-your-base.rakutest

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed and completed.

@habere-et-dispertire
Copy link
Contributor Author

I changed to a smartmatch to allow for greater equivalence as that feels more rakuish. What do you feel about putting !!! in the solution stub ?

@m-dango
Copy link
Member

m-dango commented May 5, 2023

Putting !!! in stubs is something I've considered in the past, but I don't think its user friendly on the Exercism platform. Of all the operators of that type:

!!! is a bad choice because it stops all tests from running. Without it you see all the tests fail, with the test run, and the reason for the failure.
... is a better option than the previous because all the tests continue to run, but I think it results in messy output which has no real benefit.
??? is probably the cleanest of all, but it gets marked as user output which some might find confusing.

@m-dango m-dango merged commit b99797c into exercism:main May 5, 2023
5 checks passed
@habere-et-dispertire habere-et-dispertire deleted the series branch May 5, 2023 19:31
@habere-et-dispertire
Copy link
Contributor Author

Putting !!! in stubs is something I've considered in the past, but I don't think its user friendly on the Exercism platform.

Shall we dispense of it in the robot exercise then ?

stub: |-
  has Str:D $.name = '';

  method reset-name {!!!}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants